nondeterministic finite state machine